package com.carnation.memory;

/**
 * <p>
 * JVM启动参数增加：-XX:+PrintGCDetails
 * </p>
 *
 * @author: Sunny
 * @date: 2021/1/29
 * @version: v1.0.0
 */
public class TestGC {

    /**
     * GC日志：
     * Heap
     *  PSYoungGen      total 76288K, used 57454K [0x000000076ad80000, 0x0000000770280000, 0x00000007c0000000)
     *   eden space 65536K, 87% used [0x000000076ad80000,0x000000076e59b878,0x000000076ed80000)
     *   from space 10752K, 0% used [0x000000076f800000,0x000000076f800000,0x0000000770280000)
     *   to   space 10752K, 0% used [0x000000076ed80000,0x000000076ed80000,0x000000076f800000)
     *  ParOldGen       total 175104K, used 0K [0x00000006c0800000, 0x00000006cb300000, 0x000000076ad80000)
     *   object space 175104K, 0% used [0x00000006c0800000,0x00000006c0800000,0x00000006cb300000)
     *  Metaspace       used 3523K, capacity 4498K, committed 4864K, reserved 1056768K
     *   class space    used 388K, capacity 390K, committed 512K, reserved 1048576K
     *
     */
    public static void main(String[] args) {
        byte[] allocation1, allocation2;
        allocation1 = new byte[50900 * 1024];
        allocation2 = new byte[900*1024];
    }

}
